﻿namespace Pyramid.Tests
{
    using Microsoft.VisualStudio.TestTools.UnitTesting;

    [TestClass]
    public class TryteTest
    {
        [TestMethod]
        public void ShouldParseTernary()
        {
            Tryte expected = 6;
            string ternary = "0t1Z0";
            Tryte target = Tryte.Parse(ternary);

            Assert.AreEqual(expected, target);
        }

        [TestMethod]
        public void ShouldParseNonary()
        {
            Tryte expected = (Tryte)2988;
            string nonary = "0n41Z0";
            Tryte target = Tryte.Parse(nonary);

            Assert.AreEqual(expected, target);
        }
    }
}
